package com.jinzhi.jzweb.controller.moduleConfig;


import java.util.*;

import com.jinzhi.jzweb.domain.moduleConfig.CityDO;
import com.jinzhi.jzweb.domain.moduleConfig.ProvincialDO;
import com.jinzhi.jzweb.service.moduleConfig.ProvincialService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.baomidou.mybatisplus.plugins.Page;
import com.jinzhi.common.base.BaseController;
import com.jinzhi.common.utils.Result;

/**
 * 
 * <pre>
 *  查询省市
 * </pre>
 * <small> 2024-03-29 17:13:34 | lance</small>
 */
@Controller
@RequestMapping("/jzweb/provincial")
public class ProvincialController extends BaseController {
	@Autowired
	private ProvincialService provincialService;


	@ApiOperation(value = "省份数据", notes = "省份数据")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "provincialDO", value = "赛场", required = true),
	})
	@ApiResponses({@ApiResponse(code = 0, message = "操作成功"),
			@ApiResponse(code = 500, message = "服务器内部异常")})
	@GetMapping("/listProvincial")
	@ResponseBody
	public Result<Page<ProvincialDO>> listProvincial(ProvincialDO provincialDO) {

		return Result.ok(provincialService.listProvincial(provincialDO));
	}


	@ApiOperation(value = "市级数据", notes = "市级数据")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "cityDO", value = "市级数据", required = true),
	})
	@ApiResponses({@ApiResponse(code = 0, message = "操作成功"),
			@ApiResponse(code = 500, message = "服务器内部异常")})
	@GetMapping("/listCity")
	@ResponseBody
	public Result<Page<CityDO>> listCity(CityDO cityDO) {

		return Result.ok(provincialService.listCity(cityDO));
	}
	
}
